package com.sh.data.engine.domain.integration.online.model.domain;

import com.sh.data.engine.repository.dao.integration.offline.entity.OfflineSyncEntity;
import lombok.Builder;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
public class FlinkDataSyncTaskPageDomain {

    /**
     * 主键
     */
    private Long id;

    /**
     * 任务名称
     */
    private String taskName;

    /**
     * 来源数据源类型
     */
    private String source;

    /**
     * 目标数据源类型
     */
    private String target;

    private Long sourceDsId;

    /**
     * 目标数据源id
     */
    private Long targetDsId;

    private Integer taskStatus;

    private Integer taskRunStatus;

    private int scheduleUnit;

    private Date startTime;

    private Date endTime;

    private String creator;

    protected String creatorId;

    //  private List<OfflineSyncEntity.TableMapping> tableMappings;

    private String sourceTableOrTopic;

    private String targetTableOrTopic;

    private List<OfflineSyncEntity.FieldMapping> fieldMappings;

    private Integer xxlJobLogId;

    private String recordId;

    private Date createTime;

    @Data
    @Builder(toBuilder = true)
    public static class TableMapping {

        private String mappingId;

        /*来源表*/
        private String sourceTable;

        /*目标表*/
        private String targetTable;
    }
}
